import { Component } from 'vue'
import SvgIcon from './SvgUse.vue'
import Category from './Categoy/index.vue'
import Home from './Home/index.vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const allGC: { [name: string]: Component } = { SvgIcon, Category, Home }
export default {
  install(app: any) {
    // 全部遍历注册
    Object.keys(allGC).forEach((key: string) => {
      app.component(key, allGC[key])
    })
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component)
    }
  },
}
